<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   
    <title>增加回复</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
   	<s:form action="add" namespace="/reply" onsubmit='return checkform();'>
   		标题:<s:textfield name="reply.replyName" size="120"/>
  		内容:<s:textarea name="reply.content" cols="100" rows="5"/>
   		<input type="submit" value="提交"/>
   	</s:form>
  </body>
</html>
<script type="text/javascript">
function checkform()
  {
  if(document.forms[0]["reply.replyName"].value.length ==0 )
  {
  alert("标题不能为空");
  return false;
  }
  if(document.forms[0]["reply.content"].value.length >=20)
  {
  alert("标题长度不能大于20");
  return false;
  }
  if(document.forms[0]["question.content"].value.length==0)
  {
  alert("内容不能为空");
  return false;
  }
  return true;
  }
</script>